package abd.pr1.Interface;

import java.awt.BorderLayout;
import java.awt.event.ActionListener;

import javax.swing.JFrame;
import javax.swing.JTabbedPane;

public class AdminWindow extends JFrame{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	public AdminSeriesPanel adminSeriesPanel;
	public AdminPersonajesPanel adminPersonajesPanel;
	public AdminActoresPanel adminActoresPanel;
	
	public AdminWindow (){
		super();
		this.build();
		
		this.setSize(500, 500);
		this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		this.setTitle("Administracion");
		this.setLocationRelativeTo(null);
		this.setVisible(true);
	}
	private void build() {{
		
	}
	this.getContentPane().setLayout(new BorderLayout());
		
		
		
		JTabbedPane tabbed=  new JTabbedPane();

		adminSeriesPanel = new AdminSeriesPanel();
		
		adminPersonajesPanel = new AdminPersonajesPanel();
		
		adminActoresPanel = new AdminActoresPanel();
		
		tabbed.addTab("Series", null, adminSeriesPanel);

		tabbed.addTab("Actores", null, adminActoresPanel);
		
		tabbed.addTab("Personajes", null, adminPersonajesPanel);
		
		this.getContentPane().add(tabbed,BorderLayout.CENTER);
		
		
	}
	
	public void setAdminSeriesPanelActionListener(ActionListener a){
		adminSeriesPanel.addListener(a);
	}
	
	public void setAdminPersonajesPanelActionListener(ActionListener a){
		adminPersonajesPanel.addListener(a);
	}
	
	public void setAdminActoresPanelActionListener(ActionListener a){
		//misSeries.addListener(a);
	}
}
